Using BitTorrent With DeployStudio

I'm assuming you already have a working DeployStudio setup, and followed the previous steps to create, seed, and track a .torrent file.

Install Scripts

Go to https://github.com/clintonblackmore/bt-imaging and click on the "Download ZIP" button to get the bt-imaging scripts.

7192bc38-cdf4-4539-b761-13248b00b647.png


Copy it to DeployStudio

In the extracted archive, you'll find a 'DSRepo' folder, with files and subfolders.  Carefully copy the files or folders to your DeployStudio repository/sharepoint.

You will want to place your .torrent files in the Torrents folder.

Note: the files included may vary by version of the script.

e9b3529c-c675-41cb-952d-8815d0f24563.png


Sample Workflow - Part 1

I have included a workflow.  Here is what it looks like in DeployStudio Admin.

This first step is actually optional, and only adds a few seconds to the imaging process.  It makes it much easier to work with the bt-restore script as a regular user can choose which hard drive partition to image (or you can specify the target and automate it in advance).  

[You may skip this step, but you'll need to specify the name of the volume to overwrite.  Don't count on the /dev/disk number as being the same as when not booted in DeployStudio].

Important things here:

  1. We are restoring the 16 kb "Empty Disk Image.dmg" file.
  2. Don't bother checking the restoration
  3. Yes, we want to block copy.
  4. Don't waste time renaming ByHost prefs -- there aren't any.
  5. Don't waste time doing cleanup.
  6. There is no corresponding 'Empty Disk Image.dmg' for the recovery partition.  Skip it.
  7. We can't set it as the default startup volume.  There is no information to boot with on it at this time.

d079d003-d798-485f-a727-0a002f403c66.png


Sample Workflow - Part 2

Here is where we actually run the bt-restore script.

Important things are:

  1. We are running 'bt-restore.sh'
  2. Specify a volume to restore to.  It could be "/Volumes/Macintosh HD" or "/dev/disk20s3" or "LAST_RESTORED_DEVICE".  The last one is a special flag that tells the script to ask DeployStudio which drive was chosen on the (optional) previous step.
  3. Specify where to find the torrent.  It should be in /tmp/DSNetworkRepository/Torrents/.


Note that the command-line parameters may change in future versions.

3822b251-e6c1-4d63-9f96-26dc4a86f4d1.png


Restore

Bring up a client you'd like to image, and try it out!


The End.